import React from 'react';
import type { FC } from 'react';
import { Mask, DotLoading } from 'antd-mobile';
import style from '../css/Component/loading.module.less';
import type ILoading from '../types/loading';

const LoadingCom: FC<ILoading> = (props) => {
	return (
		<div>
			<Mask className={style.mask}>
				<div className={style.loading_view} style={{ color: props.color }}>
					<DotLoading className={style.content} color="currentColor" />
					<span>{props.text}</span>
				</div>
			</Mask>
		</div>
	);
};

export default LoadingCom;
